package com.zzyy.study.controller;

import cn.hutool.core.util.IdUtil;
import com.zzyy.study.rabbitmq.RabbitMQSend;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @auther zzyy
 * @create 2024-07-07 16:09
 */
@RestController
public class RabbitMQController
{
    @Resource
    private RabbitMQSend rabbitMQSend;

    @GetMapping(value = "/mq/send")
    public String send()
    {
        rabbitMQSend.send("message-"+ IdUtil.simpleUUID());
        return "OK";
    }
}
